package com.chatgpt.api.controller;

import com.chatgpt.api.service.UserService;
import com.chatgpt.api.service.entity.User;
import com.chatgpt.base.vo.BizVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author yangjian
 */
@RestController
@Slf4j
public class UserController extends BaseController {

  @Resource
  private UserService userService;

  @GetMapping("/user/list")
  public BizVo list() {
    List<User> users = userService.list();
    return BizVo.success().setData(users);
  }
}
